using System;
using System.Collections.Generic;
using System.Text;
using FluentNHibernate.Mapping;

namespace Models.DataAccess
{


    public class PageContentMap : ClassMap<PageContent>
    {

        public PageContentMap()
        {
            Table("PageContent");
            LazyLoad();
            Id(x => x.ContentId).GeneratedBy.Guid().Column("ContentId");
            References(x => x.Folder).Column("FolderId");
            Map(x => x.Summary).Column("Summary").Length(250);
            Map(x => x.Description).Column("Description").Length(500);
            Map(x => x.KeyWords).Column("KeyWords").Length(300);
            Map(x => x.EditDate).Column("EditDate").Not.Nullable();
            Map(x => x.Content).Column("Content");
            HasMany(x => x.ContentLinks).KeyColumn("ContentId");
        }
    }
}
